package cn.lx.sequence.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @author lX
 * @version JDK 8
 * @className IdGeneratorProperties (此处以class为例)
 * @date 2024/5/23
 * @description TODO
 */
@Component
@ConfigurationProperties(
        prefix = "idgenerator.common",
        ignoreUnknownFields = false
)
public class IdGeneratorProperties {

    /**
     * 设置缓存前缀
     */
    private String preKey;

    /**
     * 生成类型  1:redis  2:雪花算法
     */
    private String generatorType;
    /**
     * 步长,每次生成多少个
     */
    private int step = 1000;



    public String getPreKey() {
        return preKey;
    }

    public void setPreKey(String preKey) {
        this.preKey = preKey;
    }

    public String getGeneratorType() {
        return generatorType;
    }

    public void setGeneratorType(String generatorType) {
        this.generatorType = generatorType;
    }

    public int getStep() {
        return step;
    }

    public void setStep(int step) {
        this.step = step;
    }
}
